<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
<head>
    <title><ui:insert name="title">Title</ui:insert></title>
    <link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/css/style.css" type="text/css"/>
</head>

<body>

<div id="wrapper">

    <div id="header">
        <div id="page-title">
            Website
        </div>
    </div>
    <div id="middle">

        <div id="container">
            <div id="content">
                <ui:insert name="content">Page Content</ui:insert>
            </div>
            <!-- #content-->
        </div>
        <!-- #container-->

        <div class="sidebar" id="sideLeft">
            <h:form>
                <c:choose>
                    <c:when test="#{facesContext.externalContext.userPrincipal != null}">
                        <h:link outcome="/secured/account/changePassword.xhtml"
                                rendered="#{facesContext.externalContext.userPrincipal != null}">
                            Сменить пароль<br/>
                        </h:link>
                        <h:commandLink action="#{authenticationBean.doLogout}" value="Выйти"
                                       rendered="#{facesContext.externalContext.userPrincipal != null}"/>
                    </c:when>
                    <c:otherwise>
                        <h:link outcome="/login.xhtml"
                                rendered="#{facesContext.externalContext.userPrincipal == null}">
                            Войти<br/>
                        </h:link>
                    </c:otherwise>
                </c:choose>
            </h:form>
        </div>
        <!-- .sidebar#sideLeft -->

    </div>
    <!-- #middle-->

</div>
<!-- #wrapper -->

<div id="footer">

</div>
<!-- #footer -->

</body>
</html>